<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<script>
			
			var reg = new RegExp('b','i');
			var str = 'abcdef';
			var index = str.search(reg);
			console.log(index);
		</script>
	</body>
</html>
